import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'login',
    component: ()=>import('../views/Login.vue')
  },
  {
    path: '/index',
    name: 'index',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: ()=>import('../views/Index.vue'),
    children: [
      {
        path:'noteEditor',
        name:'noteEditor',
        component:()=>import('../views/NoteEditor.vue'),
      }
    ]
  },
  {
    path: '/register',
    name: 'register',
    component: ()=>import('../views/registerAccount.vue')
  }

]

const router = new VueRouter({
  routes
})

export default router
